home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / System 7.0 Samples / MacShell / MacShell.protos < prev    next >
Encoding:
Text File  |  1991-12-04  |  6.4 KB  |  214 lines  |  [TEXT/MPS ]

  1. #ifndef __APPLEEVENTS__
  2. #include <AppleEvents.h>
  3. #endif
  4.  
  5. #ifndef __APPLETALK__
  6. #include <AppleTalk.h>
  7. #endif
  8.  
  9. #ifndef __LISTS__
  10. #include <Lists.h>
  11. #endif
  12.  
  13. #ifndef __MENUS__
  14. #include <Menus.h>
  15. #endif
  16.  
  17. #ifndef __STANDARDFILE__
  18. #include <StandardFile.h>
  19. #endif
  20.  
  21.  
  22. /************** AEConnect.c **************/
  23.  
  24. void            InitConnectAppleEvents(void);
  25. pascal OSErr    DoAEAnswer(AppleEvent *message, AppleEvent *reply, long refcon);
  26. OSErr            SendConnect(FileRecHndl frHndl);
  27. pascal OSErr    ReceiveConnect(AppleEvent *message, AppleEvent *reply, long refcon);
  28. pascal OSErr    ReceiveConnectReply(AppleEvent *message, AppleEvent *reply);
  29. WindowPtr        GetAEWindow(long windID_0, long windID_1);
  30. pascal Boolean    AEPortFilter(LocationNamePtr locationName, PortInfoPtr thePortInfo);
  31.  
  32.  
  33.  
  34. /************** AECustom.c **************/
  35.  
  36. void            InitCustomAppleEvents(void);
  37. OSErr            SendMessage(FileRecHndl frHndl, short messageType);
  38. pascal OSErr    ReceiveMessage(AppleEvent *message, AppleEvent *reply, long refcon);
  39.  
  40.  
  41.  
  42. /************** AERequired.c **************/
  43.  
  44. void            InitRequiredAppleEvents(void);
  45. pascal OSErr    DoAEOpenApplication(AppleEvent *message, AppleEvent *reply, long refcon);
  46. pascal OSErr    DoAEOpenDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
  47. pascal OSErr    DoAEPrintDocuments(AppleEvent *message, AppleEvent *reply, long refcon);
  48. pascal OSErr    DoAEQuitApplication(AppleEvent *message, AppleEvent *reply, long refcon);
  49. OSErr            OpenDocEventHandler(AppleEvent *message, AppleEvent *reply, short mode);
  50.  
  51.  
  52.  
  53. /************** AEUtils.c **************/
  54.  
  55. void            DoHighLevelEvent(EventRecord *event);
  56. OSErr            GetTargetInfo(AEAddressDesc targetDesc, StringPtr zone, StringPtr machine, StringPtr application);
  57. OSErr            MakeTarget(AEAddressDesc *target, Boolean sendDirect, short replyMode, Str255 prompt, Str255 applListLabel, PPCFilterProcPtr portFilter, char *theLocNBPType);
  58. Boolean            MissedAnyParameters(AppleEvent *message);
  59.  
  60.  
  61.  
  62. /************** AppleTalk.c **************/
  63.  
  64. OSErr            ATInit(void);
  65. OSErr            DoBuildZoneList(ListHandle listHndl);
  66. OSErr            DoSelectMyZone(ListHandle listHndl);
  67. OSErr            AddPPCNBPAlias(NamesTableEntry *theNTE, Str32 newNBPType, EntityName *newEntity);
  68. OSErr            RemoveNBPAlias(EntityPtr theEntity);
  69.  
  70.  
  71.  
  72. /************** DoCursor.c **************/
  73.  
  74. void            DoCursor(void);
  75. void            DoSetCursor(Cursor *cursor);
  76.  
  77.  
  78.  
  79. /************** DoEvent.c **************/
  80.  
  81. void            DoEvent(EventRecord *event);
  82. void            DoActivate(WindowPtr window, Boolean becomingActive);
  83. void            DoUpdate(WindowPtr window);
  84.  
  85.  
  86.  
  87. /************** EventLoop.c **************/
  88.  
  89. void            EventLoop(void);
  90.  
  91.  
  92.  
  93. /************** File.c **************/
  94.  
  95. OSErr            AppDisposeDocument(FileRecHndl frHndl);
  96. OSErr            AppNewDocument(FileRecHndl *returnHndl, OSType sftype);
  97. OSErr            AppOpenDocument(FileRecHndl *result, FSSpecPtr fileToOpen, char permission);
  98. OSErr            AppSaveDocument(FileRecHndl    frHndl, WindowPtr window, short saveMode);
  99. void            ConvertOldToNewSFReply(SFReply *oldReply, StandardFileReply *newReply);
  100. OSErr            Create_OpenFile(FSSpec *file, short *refNum);
  101. Boolean         DisplayGetFile(StandardFileReply *reply);
  102. Boolean         DisplayPutFile(StandardFileReply *reply);
  103. void            IncNewFileNum(Boolean flag);
  104.  
  105.  
  106.  
  107. /************** File2.c **************/
  108.  
  109. void            AppFreeDocument(FileRecHndl frHndl);
  110. OSErr            AppInitDocument(FileRecHndl frHndl);
  111. OSErr            AppReadDocument(FileRecHndl frHndl);
  112. OSErr            AppWriteDocument(FileRecHndl frHndl);
  113. OSErr            AppDuplicateDocument(FileRecHndl oldFrHndl, FileRecHndl *newFrHndl);
  114.  
  115.  
  116.  
  117. /************** Help.c **************/
  118.  
  119. void            DynamicBalloonHelp(void);
  120.  
  121.  
  122.  
  123. /************** IdleTasks.c **************/
  124.  
  125. void            DoIdleTasks(EventRecord *event);
  126. void            NotifyCancel(void);
  127. void            NotifyUser(void);
  128.  
  129.  
  130.  
  131. /************** Init.c **************/
  132.  
  133. void            Initialize(void);
  134. void            StartDocuments(void);
  135.  
  136.  
  137. /************** Menu.c **************/
  138.  
  139. void            AdjustMenus(void);
  140. void            EnableOrDisableItem(MenuHandle menu, short item, Boolean enable);
  141. void            DoMenuCommand(long menuResult);
  142.  
  143.  
  144.  
  145. /************** Print.c **************/
  146.  
  147. OSErr            AppPrintDocument(FileRecHndl frHndl, Boolean jobDlg, Boolean firstJob);
  148. OSErr            PresentStyleDialog(FileRecHndl frHndl);
  149.  
  150.  
  151.  
  152. /************** Start.c **************/
  153.  
  154. void            main(void);
  155.  
  156.  
  157.  
  158. /************** Utils.c **************/
  159.  
  160. void            appendi2cstr(char *cstr, short i);
  161. short            appendi2pstr(char *pstr, short i);
  162. short            i2cstr(char *cstr, short i);
  163. void            i2pstr(char *pstr, short i);
  164. void            pstrcat(char *d, char *s);
  165. void            pstrcpy(char *d, char *s);
  166. short            GetHexByte(char *cptr);
  167. pascal Boolean    alertFilter(DialogPtr dlg, EventRecord *event, short *item);
  168. pascal Boolean    keyEquivFilter(DialogPtr dlg, EventRecord *event, short *item);
  169. void            OffsetControl(ControlHandle ctl, short dx, short dy);
  170. void            DoDrawGrowIcon(WindowPtr window, Boolean horLine, Boolean verLine);
  171. void            DoDrawControls(WindowPtr window, Boolean scrollBarsOnly);
  172. void            DoDraw1Control(ControlHandle ctl, Boolean scrollBarsOnly);
  173.  
  174.  
  175.  
  176. /************** Window.c **************/
  177.  
  178. OSErr            DoNewWindow(FileRecHndl frHndl, WindowPtr *retWindow, WindowPtr behind, short attributes);
  179. void            NewWindowTitle(WindowPtr window);
  180. Boolean            GetWindowDirty(WindowPtr window);
  181. void            SetWindowDirty(WindowPtr window);
  182. Boolean            DisposeAllWindows(void);
  183. Boolean            DisposeOneWindow(WindowPtr window, short saveMode);
  184. WindowPtr        SetFilePort(FileRecHndl frHndl);
  185. void            DoResizeWindow(WindowPtr window, short oldh, short oldv);
  186. void            DoDrawFrame(WindowPtr window);
  187. RgnHandle        DoCalcFrameRgn(WindowPtr window);
  188. void            DoUpdateSeparate(WindowPtr window, RgnHandle *contRgn, RgnHandle *frameRgn);
  189. void            BeginContent(WindowPtr window);
  190. void            EndContent(WindowPtr window);
  191. void            AdjustScrollBars(WindowPtr window);
  192. void            GetContentOrigin(WindowPtr window, Point *contOrg);
  193. void            SetContentOrigin(WindowPtr window, short newh, short newv);
  194. void            GetContentRect(WindowPtr window, Rect *contRct);
  195. void            SetDocSize(FileRecHndl frHndl, short hSize, short vSize);
  196. void            DoImageDocument(FileRecHndl frHndl);
  197. void            DoContentClick(WindowPtr window, EventRecord *event);
  198. void            DoContentKey(WindowPtr window, EventRecord *event);
  199.  
  200.  
  201.  
  202. /************** Window2.c **************/
  203.  
  204. OSErr            InitContent(FileRecHndl frHndl, WindowPtr window);
  205. void            ImageDocument(FileRecHndl frHndl);
  206. void            ResizeContent(WindowPtr window, short oldh, short oldv);
  207. void            DrawFrame(FileRecHndl frHndl, WindowPtr window);
  208. void            CalcFrameRgn(FileRecHndl frHndl, WindowPtr window, RgnHandle rgn);
  209. void            ContentClick(WindowPtr window, EventRecord *event);
  210. void            ContentKey(WindowPtr window, EventRecord *event);
  211.  
  212.  
  213.  
  214.